﻿using System;
using System.Collections.Generic;
using Medianamik.Core;
using Medianamik.Core.DAL;
using SubSonic;

namespace Medianamik.UI.Web.Shop.Data
{
    public partial class ProductWithCategory : Interfaces.IProduct, IRecordBase
    {
        private Uri _defaultUrl;
        public Uri DefaultUrl
        {
            get
            {
                return _defaultUrl
                    ?? (_defaultUrl = new Medianamik.Client.Utility()
                    .GetDefaultUrl(System.Web.HttpContext.Current.Request
                        , System.Globalization.CultureInfo.GetCultureInfo(CultureName ?? String.Empty)
                        , NodeId));
            }
        }

        private string _defaultRelativePath;
        public string DefaultRelativePath
        {
            get
            {
                if ((_defaultRelativePath ?? String.Empty) == String.Empty)
                    _defaultRelativePath = new Medianamik.Client.Utility().GetDefaultRelativePath(NodeId
                                                , System.Globalization.CultureInfo.GetCultureInfo(CultureName ?? String.Empty));
                return _defaultRelativePath;
            }
        }

        public double? Height
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        public double? Weight
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        public double? Length
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        public double? Width
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }
    }

    public partial class ProductWithCategoryCollection : ICollectionWithChildren<ProductWithCategoryCollection, ProductWithCategory>
    {
        public ProductWithCategoryCollection LoadChildNodes(Guid pNodeId, string cultureName, bool pInclusive, int pMaxDepth, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }

        public ProductWithCategoryCollection LoadParentNodes(Guid pNodeId, string cultureName, bool pInclusive, int pMaxDepth, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }

        public ProductWithCategoryCollection Load(string cultureName, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }

        public IEnumerable<ProductWithCategory> LoadByIDs(string ids, string cultureName, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }

        public IEnumerable<ProductWithCategory> LoadByIDs(IList<Guid> ids, string cultureName, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }
    }
}
